package com.huirui.server.pojo.dto;

import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 缺货登记记录DTO（数据传输对象）
 * 用于接口请求/响应中的缺货登记相关数据封装
 */
@Data
@Schema(
        name = "StockShortageRecordDto",
        description = "缺货登记记录数据传输对象",
        example = "{\"id\":1,\"productName\":\"iPhone 15 Pro\",\"brandName\":\"苹果\",\"productSpecificationName\":\"256GB 黑色\",\"productImages\":[\"https://example.com/img1.jpg\",\"https://example.com/img2.jpg\"],\"status\":0}"
)
public class StockShortageRecordDto {

    @Schema(
            description = "主键ID（新增时无需传值，更新/查询时必填）",
            type = "integer",
            example = "1",
            hidden = false
    )
    private Long id;

    @Schema(
            description = "商品名称（必填）",
            type = "string",
            example = "iPhone 15 Pro",
            requiredMode = Schema.RequiredMode.REQUIRED
    )
    private String productName;

    @Schema(
            description = "品牌名称（可选）",
            type = "string",
            example = "苹果",
            requiredMode = Schema.RequiredMode.NOT_REQUIRED
    )
    private String brandName;

    @Schema(
            description = "商品规格名称（可选）",
            type = "string",
            example = "256GB 黑色",
            requiredMode = Schema.RequiredMode.NOT_REQUIRED
    )
    private String productSpecificationName;

    @Schema(
            description = "商品图片URL列表（可选，支持多图）",
            type = "array",
            requiredMode = Schema.RequiredMode.NOT_REQUIRED
    )
    @ArraySchema(
            arraySchema = @Schema(description = "图片URL数组"),
            schema = @Schema(description = "单张图片URL", example = "https://example.com/img1.jpg")
    )
    private List<String> productImages;

    @Schema(
            description = "处理状态（0=未处理，1=已处理，必填）",
            type = "integer",
            example = "0",
            allowableValues = {"0", "1"},
            requiredMode = Schema.RequiredMode.REQUIRED
    )
    private Integer status;
}
